package main

/**
该模块，如果想和SN系统结合，需要将KeyGenerator生成的key另存为文本形式，然后再与该系统进行结合
当前缺点：密码需要定长..............
 */

func main(){

	//MD5
	//fmt.Println(MD5Util.Encode("ABCDEFG"))

	//BASE64
	//var message ="这是一段中文"
	//fmt.Println(Base64Util.EncodeMessage([]byte(message)))
	//fmt.Println(string(Base64Util.DecodeMessage(Base64Util.EncodeMessage([]byte(message)))))


	//var key = "12345678"
	//var str = "ccccccccccccccccccccc"
	//var ming ,mi string
	//var err error
	//mi,err = DESUtil.EncryptStr(key,str)
	//if(err !=nil){
	//	panic(err)
	//}
	//fmt.Println(mi)
	//ming,err = DESUtil.DecryptStr(key,mi)
	//if(err !=nil){
	//	panic(err)
	//}
	//fmt.Println(ming)

	//var key = "12345678"
	//var str = "cccccccc"
	//var ming ,mi string
	//var err error
	//mi,err = DESUtil.EncryptStrECB(key,str)
	//if(err !=nil){
	//	panic(err)
	//}
	//fmt.Println(mi)
	//ming,err = DESUtil.DecryptStrECB(key,mi)
	//if(err !=nil){
	//	panic(err)
	//}
	//fmt.Println(ming)


	//var key = "12345678901234567890123456789012"
	//var str = "ccccccccccccccccccccc"
	//var ming ,mi string
	//var err error
	//mi,err = AESUtil.EncryptStr(key,str)
	//if(err !=nil){
	//	panic(err)
	//}
	//fmt.Println(mi)
	//ming,err = AESUtil.DecryptStr(key,mi)
	//if(err !=nil){
	//	panic(err)
	//}
	//fmt.Println(ming)

	//var s = "1111111111111111111"
	//var enstr,_ = MainSecurity.Encode(s)
	//var destr,_ = MainSecurity.Decode(enstr)
	//fmt.Println(enstr)
	//fmt.Println(destr)
	//
	//fmt.Println(SHAUtil.Encode("AAAAAAAAAAAAAAAAAa"))

	//var b1,e1 = RSAUtil.Encode(RSAUtil.PublicKey,[]byte("AAAAAAA"))
	//if(e1!=nil){
	//	panic(e1)
	//}
	//var b2,e2 = RSAUtil.Decode(RSAUtil.PrivateKey,b1)
	//if(e2!=nil){
	//	panic(e2)
	//}
	//fmt.Println(string(b2))

}